#!name = 微博去广告
#!desc = 过滤微博广告及去除各部分推广模块
#!openUrl = 
#!author = RuCu6 zmqcherish Cuttlefish
#!homepage = https://gitlab.com/lodepuly/vpn_tool/-/tree/main/Tool/QuantumultX/Rewrite

#[rewrite_local]
# 首页 签到、发布按钮、侧边栏、右上角红包、侧边栏提醒、超话tab悬浮、顶部直播
^https:\/\/api\.weibo\.cn\/2\/(ug\/checkin\/list|push\/daily)\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/!\/live\/media_homelist\? url reject-dict

# 详情页 超话、评论区、看图界面、个人主页、我的页面、信息流、商品橱窗、视频流、视频号、视频调查、话题卡片
^https:\/\/api\.weibo\.cn\/2\/comments\/bullet_screens\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/photo\/info\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/statuses\/(container_positive|push_info)\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/!\/huati\/(discovery_home_bottom_getdotinfo|mobile_discovery_searchchange)\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/vote\/get_vote_detail\? url reject-dict

# 发现页 热门微博信息流、搜索列表、热搜提醒、猜你想搜、视频流红包
^https:\/\/api\.weibo\.cn\/2\/search\/container_discover\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/hot\/hours_spotlight\? url reject-dict
^https:\/\/api\.weibo\.cn\/2\/video\/redpacket\? url reject-dict
^https:\/\/api\.weibo\.cn\/!\/sug\/list\/finderchange\? url reject-dict

# 开屏广告 //*.uve.weibo.com
^https:\/\/bootrealtime\.uve\.weibo\.com\/v2\/ad\/realtime$ url reject-dict
^https:\/\/sdkapp\.uve\.weibo\.com\/interface\/sdk\/(get-lbs-cell-info\.php$|sdkconfig\.php\?) url reject

# 微博长文章推广
^https:\/\/card\.weibo\.com\/article\/m\/aj\/(reward|uvead)\? url reject-dict
^https:\/\/weibo\.com\/ttarticle\/x\/m\/aj\/(reward|uvead)\? url reject-dict


# 首页 签到、发布按钮、侧边栏、右上角红包、侧边栏提醒、超话tab悬浮、顶部直播
^https:\/\/api\.weibo\.cn\/2\/(checkin\/show|client\/publisher_list|push\/active)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js

# 详情页 超话、评论区、看图界面、个人主页、我的页面、信息流、商品橱窗、视频流、视频号、话题卡片
^https:\/\/api\.weibo\.cn\/2\/(cardlist|page)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/comments\/build_comments\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/(container\/asyn|flowlist)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/profile\/(container_timeline|me)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/statuses\/(container_timeline(_topic|_unread|_hot)?|unread_hot_timeline)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/statuses\/(extend|show)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/video\/tiny_stream_video_list\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/!\/huati\/discovery_home_bottom_channels\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js

# 消息页
^https:\/\/api\.weibo\.cn\/2\/messageflow\/notice\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js

# 发现页 热门微博信息流、搜索列表、热搜提醒、猜你想搜、视频流红包
^https:\/\/api\.weibo\.cn\/2\/search\/(container_timeline|finder)\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/api\.weibo\.cn\/2\/searchall\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js

# 开屏广告 //*.uve.weibo.com
^https:\/\/bootpreload\.uve\.weibo\.com\/v1\/ad\/preload$ url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/sdkapp\.uve\.weibo\.com\/interface\/sdk\/sdkad\.php$ url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js
^https:\/\/wbapp\.uve\.weibo\.com\/wbapplua\/wbpullad\.lua\? url script-response-body https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_ads.js

# 跳过重定向页面以直接访问 //weibo.cn, shop.sc.weibo.com, t.cn, sinaurl.cn
^https:\/\/weibo\.cn\/sinaurl\?(.*&)?(u|toasturl|goto)= url script-echo-response https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_redirect.js
^https:\/\/shop\.sc\.weibo\.com\/h5\/jump\/error\?(.*&)?url= url script-echo-response https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_redirect.js
^https:\/\/(sinaurl|t)\.cn\/ url script-response-header https://gitlab.com/lodepuly/vpn_tool/-/raw/master/Resource/Script/Weibo/Weibo_remove_redirect.js

#[mitm]
hostname = api.weibo.cn, *.uve.weibo.com, card.weibo.com, weibo.com, weibo.cn, shop.sc.weibo.com, t.cn, sinaurl.cn